package com.example.memory.base.dao;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.example.memory.base.entity.SQLBuilder;
import java.util.List;

@Mapper
public interface BaseDao<T> {
    void insert(T t);

    void delete(String key);

    void update(T key);

    T select(String key);

    List<T> getList(T t);

    void insertList(List<T> list);

    void deleteFree(SQLBuilder builder);

    void updateFree(SQLBuilder builder);

    void updateList(List<T> list);

    void updateByBuilder(@Param("key") T key, @Param("builder") SQLBuilder builder);

    T selectFree(SQLBuilder builder);

    List<T> selectList(SQLBuilder builder);

    String selectStringFree(SQLBuilder builder);

    List<String> selectStringListFree(SQLBuilder builder);

    List<T> selectListFree(SQLBuilder builder);

    long countByBuilder(SQLBuilder builder);

    void truncate();
}
